<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="http://www.shitou.com" %>
<%@ include file="base.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=GBK" />
	<title>项目统计</title>
	<link rel="stylesheet" type="text/css" href="${basePath}/style/reset.css" media="all" />
	<link rel="stylesheet" type="text/css" href="${basePath}/style/layout.css" media="all" />
	<link rel="stylesheet" type="text/css" href="${basePath}/style/invalid.css" media="all" />
	<link rel="stylesheet" type="text/css" href="${basePath}/style/style.css" media="all" />
	<script type="text/javascript" src="${basePath}/script/jquery-1.4.3.min.js"></script>
	<script type="text/javascript" src="${basePath}/script/jquery.fusioncharts.js"></script>
	<script type="text/javascript" src="${basePath}/script/jquery.mousewheel-3.0.4.pack.js"></script>
	<script type="text/javascript" src="${basePath}/script/jquery.tipTip.minified.js"></script>
	<script type="text/javascript" src="${basePath}/script/simpla.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#main-nav-a-report").addClass("current");
			$("#tofusion").click(function(){
				$("#main-nav-a-report").attr("href","project!report2.jspx");
				window.location.href = "project!report2.jspx";
			});
			$("#tonormal").click(function(){
				$("#main-nav-a-report").attr("href","project!report.jspx");
				window.location.href = "project!report.jspx";
			});
		});
	</script>
</head>
<body>
	<div id="body-wrapper">
		<!-- sidebar开始 -->
		<%@ include file="left.jsp" %>
		<!-- sidebar结束 -->
		<!-- main-content开始 -->
		<div id="main-content">
			<div class="content-box closed-box">
				<div class="content-box-header">
					<h3><a href="index.jspx">首页</a>&gt 项目统计</h3><c:if test="${projectList != null}"><input id="tofusion" type="button" class="button right" style="margin: 6px;" value="切换到fusion版"/><a href="${basePath}/report.pdf" class="button right">下载统计pdf</a></c:if>
					<c:if test="${reportList != null}"><input id="tonormal" type="button" class="button right" style="margin: 6px;" value="切换到普通版"/></c:if> 
				</div>
			</div>
			<!-- 项目统计开始 -->
			<c:forEach items="${projectList}" var="project" varStatus="status">
				<c:if test="${status.count % 2 == 1}">
					<div class="content-box column-left">
						<div class="content-box-noheader">
							<h4>${status.count}.<a href="${basePath}/project.jspx?id=${project.id}">${project.name}</a></h4>
							<img src="${basePath}/report/project${project.id}.jpg"/>
						</div>
					</div>
				</c:if>
				<c:if test="${status.count % 2 == 0}">
					<div class="content-box column-right">
						<div class="content-box-noheader">
							<h4>${status.count}.<a href="${basePath}/project.jspx?id=${project.id}">${project.name}</a></h4>
							<img src="${basePath}/report/project${project.id}.jpg"/>
						</div>
					</div>
				</c:if>
			</c:forEach>
			<!-- 项目统计结束 -->
			<!-- fusion统计开始 -->
			<c:forEach items="${reportList}" var="report" varStatus="status">
				<c:if test="${status.count % 2 == 1}">
					<div class="content-box column-left">
						<div class="content-box-noheader">
							<h4>${status.count}.<a href="${basePath}/project.jspx?id=${report.id}">${report.name}</a></h4>
							<center>
							<s:report_table report="${report}"/>
							<script type="text/javascript">
							var id = "#project" + ${report.id};
							$(id).convertToFusionCharts({
								swfPath: "Charts/",
								type: "MSColumn3D",
								data: "#myHTMLTable",
								dataFormat: "HTMLTable"
							});
							</script>
							</center>
						</div>
					</div>
				</c:if>
				<c:if test="${status.count % 2 == 0}">
					<div class="content-box column-right">
						<div class="content-box-noheader">
							<h4>${status.count}.<a href="${basePath}/project.jspx?id=${report.id}">${report.name}</a></h4>
							<center>
							<s:report_table report="${report}"/>
							<script type="text/javascript">
							var id = "#project" + ${report.id};
							$(id).convertToFusionCharts({
								swfPath: "Charts/",
								type: "MSColumn3D",
								data: "#myHTMLTable",
								dataFormat: "HTMLTable"
							});
							</script>
							</center>
						</div>
					</div>
				</c:if>
			</c:forEach>
			<!-- fusion统计结束 -->
			<div class="clear"></div>
			<%@include file="foot.jsp" %>
		</div>
		<!-- main-content结束 -->
	</div>
</body>
</html>
